Functions for Defining Logic in a Preemption Process

The Preemption Process Logic feature includes the following functions for use in the preemption logic.

PREEMPTOR() Identifies whether a downtime or entity is making the preemptive request. It returns a 0 if the preemptor is a downtime, otherwise it returns the index number of the preempting entity.

TIMELEFT() Returns the amount of time remaining if the preemption occurred during a WAIT or USE statement. It returns a time value in default time units (real). If multiple entities are preempted from a location, it returns the longest remaining time for all of the entities.

Please note

The values returned by these functions must be checked before any processing delay occurs since they are updated whenever a preemption takes place. If the values must be referred to later, they should be assigned to the entity’s attribute or to a local variable.